package cn.jofei.server.interf;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.concurrent.Promise;

import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * ServerQ接口
 *
 * @author Jofei Bao
 * @version ngbao v1.0.2
 * @date 2022/7/12 15:53
 */
public interface ServerQueue {
    /**
     * 会话队列
     */
    ConcurrentHashMap<Integer, Promise<Channel>> REQUEST_QUEUE_NETTY = new ConcurrentHashMap<>();
    /**
     * 客户端注册信息
     */
    ConcurrentHashMap<Integer, Channel> REG_TCP_CHANNELS = new ConcurrentHashMap<>();
    ConcurrentHashMap<String, ChannelHandlerContext> CLIENT_REG_INFO = new ConcurrentHashMap<>();
    /**
     * 客户端映射关系
     * key：IP:端口
     * value：set<string> 子域名或端口
     */
    ConcurrentHashMap<String, Set<String>> CLIENT_REG_INFO_MAPPING = new ConcurrentHashMap<>();
}
